/**
 * futures : masterlink.futures.vo.RealTimeRateTXO.java
 */
package masterlink.futures.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/11/4
 * @version 1.0.0	
 */
@Entity
 @Table(name="IVREALTIMERATE_TXO")
public class RealTimeRateTXO implements Serializable {

	private static final long serialVersionUID = -3295674346379829532L;
	@EmbeddedId
	private RealTimeRateTXOID id;
	@Column(name="ttime")
	private String ttime;
	@Column(name="setmonth")
	private String setMonth;
	@Column(name="strikeprice")
	private String strikePrice;
	@Column(name="c_p")
	private String cp;
	@Column(name="MATCHPRICE")
	private Float matchPrice=0f;
	@Column(name="REFERENCEPRICE")
	private Float referencePrice=0f;
	@Column(name="DAYVOLUMN")
	private Float dayVoumn=0f;
	@Column(name="INTIMEVALUE")
	private Float intimeValue=0f;
	@Column(name="TIMEPRICE")
	private Float timePrice=0f;
	@Column(name="DEALPRICE")
	private Float dealPrice=0f;
	@Column(name="SIGMAVALUE")
	private Float sigmaValue=0f;
	@Column(name="VERBRATE_MATCH")
	private Float verbrateMatch=0f;
	@Column(name="THEORETICALPRICE")
	private Float theorEticalPrice=0f;
	@Column(name="DELTAVALUE")
	private Float deltaValue=0f;
	@Column(name="GAMMAVALUE")
	private Float gammaValue=0f;
	@Column(name="THETAVALUE")
	private Float thetaValue=0f;
	@Column(name="VEGAVALUE")
	private Float vagaValue=0f;
	@Column(name="RHOVALUE")
	private Float rhoValue=0f;
	@Column(name="VARVALUE")
	private Float varValue=0f;
	
	/**
	 * @return the id
	 */
	public RealTimeRateTXOID getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(RealTimeRateTXOID id) {
		this.id = id;
	}


	/**
	 * @return the ttime
	 */
	public String getTtime() {
		return ttime;
	}


	/**
	 * @param ttime the ttime to set
	 */
	public void setTtime(String ttime) {
		this.ttime = ttime;
	}


	/**
	 * @return the setMonth
	 */
	public String getSetMonth() {
		return setMonth;
	}


	/**
	 * @param setMonth the setMonth to set
	 */
	public void setSetMonth(String setMonth) {
		this.setMonth = setMonth;
	}


	/**
	 * @return the strikePrice
	 */
	public String getStrikePrice() {
		return strikePrice;
	}


	/**
	 * @param strikePrice the strikePrice to set
	 */
	public void setStrikePrice(String strikePrice) {
		this.strikePrice = strikePrice;
	}


	/**
	 * @return the cp
	 */
	public String getCp() {
		return cp;
	}


	/**
	 * @param cp the cp to set
	 */
	public void setCp(String cp) {
		this.cp = cp;
	}


	/**
	 * @return the matchPrice
	 */
	public Float getMatchPrice() {
		return matchPrice;
	}


	/**
	 * @param matchPrice the matchPrice to set
	 */
	public void setMatchPrice(Float matchPrice) {
		this.matchPrice = matchPrice;
	}


	/**
	 * @return the referencePrice
	 */
	public Float getReferencePrice() {
		return referencePrice;
	}


	/**
	 * @param referencePrice the referencePrice to set
	 */
	public void setReferencePrice(Float referencePrice) {
		this.referencePrice = referencePrice;
	}


	/**
	 * @return the dayVoumn
	 */
	public Float getDayVoumn() {
		return dayVoumn;
	}


	/**
	 * @param dayVoumn the dayVoumn to set
	 */
	public void setDayVoumn(Float dayVoumn) {
		this.dayVoumn = dayVoumn;
	}


	/**
	 * @return the intimeValue
	 */
	public Float getIntimeValue() {
		return intimeValue;
	}


	/**
	 * @param intimeValue the intimeValue to set
	 */
	public void setIntimeValue(Float intimeValue) {
		this.intimeValue = intimeValue;
	}


	/**
	 * @return the timePrice
	 */
	public Float getTimePrice() {
		return timePrice;
	}


	/**
	 * @param timePrice the timePrice to set
	 */
	public void setTimePrice(Float timePrice) {
		this.timePrice = timePrice;
	}


	/**
	 * @return the dealPrice
	 */
	public Float getDealPrice() {
		return dealPrice;
	}


	/**
	 * @param dealPrice the dealPrice to set
	 */
	public void setDealPrice(Float dealPrice) {
		this.dealPrice = dealPrice;
	}


	/**
	 * @return the sigmaValue
	 */
	public Float getSigmaValue() {
		return sigmaValue;
	}


	/**
	 * @param sigmaValue the sigmaValue to set
	 */
	public void setSigmaValue(Float sigmaValue) {
		this.sigmaValue = sigmaValue;
	}


	/**
	 * @return the verbrateMatch
	 */
	public Float getVerbrateMatch() {
		return verbrateMatch;
	}


	/**
	 * @param verbrateMatch the verbrateMatch to set
	 */
	public void setVerbrateMatch(Float verbrateMatch) {
		this.verbrateMatch = verbrateMatch;
	}


	/**
	 * @return the theorEticalPrice
	 */
	public Float getTheorEticalPrice() {
		return theorEticalPrice;
	}


	/**
	 * @param theorEticalPrice the theorEticalPrice to set
	 */
	public void setTheorEticalPrice(Float theorEticalPrice) {
		this.theorEticalPrice = theorEticalPrice;
	}


	/**
	 * @return the deltaValue
	 */
	public Float getDeltaValue() {
		return deltaValue;
	}


	/**
	 * @param deltaValue the deltaValue to set
	 */
	public void setDeltaValue(Float deltaValue) {
		this.deltaValue = deltaValue;
	}


	/**
	 * @return the gammaValue
	 */
	public Float getGammaValue() {
		return gammaValue;
	}


	/**
	 * @param gammaValue the gammaValue to set
	 */
	public void setGammaValue(Float gammaValue) {
		this.gammaValue = gammaValue;
	}


	/**
	 * @return the thetaValue
	 */
	public Float getThetaValue() {
		return thetaValue;
	}


	/**
	 * @param thetaValue the thetaValue to set
	 */
	public void setThetaValue(Float thetaValue) {
		this.thetaValue = thetaValue;
	}


	/**
	 * @return the vagaValue
	 */
	public Float getVagaValue() {
		return vagaValue;
	}


	/**
	 * @param vagaValue the vagaValue to set
	 */
	public void setVagaValue(Float vagaValue) {
		this.vagaValue = vagaValue;
	}


	/**
	 * @return the rhoValue
	 */
	public Float getRhoValue() {
		return rhoValue;
	}


	/**
	 * @param rhoValue the rhoValue to set
	 */
	public void setRhoValue(Float rhoValue) {
		this.rhoValue = rhoValue;
	}


	/**
	 * @return the varValue
	 */
	public Float getVarValue() {
		return varValue;
	}


	/**
	 * @param varValue the varValue to set
	 */
	public void setVarValue(Float varValue) {
		this.varValue = varValue;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("RealTimeRateTXO [id=");
		builder.append(id);
		builder.append(", ttime=");
		builder.append(ttime);
		builder.append(", setMonth=");
		builder.append(setMonth);
		builder.append(", strikePrice=");
		builder.append(strikePrice);
		builder.append(", cp=");
		builder.append(cp);
		builder.append("]");
		return builder.toString();
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}


	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof RealTimeRateTXO))
			return false;
		RealTimeRateTXO other = (RealTimeRateTXO) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	public static class RealTimeRateTXOID implements Serializable{

		private static final long serialVersionUID = 1L;
		@Column(name="tdate")
		private String tdate;
		@Column(name="prodid")
		private String prodId;
		@Column(name="rate")
		private Float rate=0f;
		/**
		 * @return the tdate
		 */
		public String getTdate() {
			return tdate;
		}
		/**
		 * @param tdate the tdate to set
		 */
		public void setTdate(String tdate) {
			this.tdate = tdate;
		}
		/**
		 * @return the prodId
		 */
		public String getProdId() {
			return prodId;
		}
		/**
		 * @param prodId the prodId to set
		 */
		public void setProdId(String prodId) {
			this.prodId = prodId;
		}
		/**
		 * @return the rate
		 */
		public Float getRate() {
			return rate;
		}
		/**
		 * @param rate the rate to set
		 */
		public void setRate(Float rate) {
			this.rate = rate;
		}
		/* (non-Javadoc)
		 * @see java.lang.Object#toString()
		 */
		@Override
		public String toString() {
			StringBuilder builder = new StringBuilder();
			builder.append("RealTimeRateTXOID [tdate=");
			builder.append(tdate);
			builder.append(", prodId=");
			builder.append(prodId);
			builder.append(", rate=");
			builder.append(rate);
			builder.append("]");
			return builder.toString();
		}
		/* (non-Javadoc)
		 * @see java.lang.Object#hashCode()
		 */
		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result
					+ ((prodId == null) ? 0 : prodId.hashCode());
			result = prime * result + ((rate == null) ? 0 : rate.hashCode());
			result = prime * result + ((tdate == null) ? 0 : tdate.hashCode());
			return result;
		}
		/* (non-Javadoc)
		 * @see java.lang.Object#equals(java.lang.Object)
		 */
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (!(obj instanceof RealTimeRateTXOID))
				return false;
			RealTimeRateTXOID other = (RealTimeRateTXOID) obj;
			if (prodId == null) {
				if (other.prodId != null)
					return false;
			} else if (!prodId.equals(other.prodId))
				return false;
			if (rate == null) {
				if (other.rate != null)
					return false;
			} else if (!rate.equals(other.rate))
				return false;
			if (tdate == null) {
				if (other.tdate != null)
					return false;
			} else if (!tdate.equals(other.tdate))
				return false;
			return true;
		}
	}
	
}
